<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../js/vue.js"></script>
<!-- 引入样式 -->
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
<!-- 引入组件库 -->
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
    <style>

    </style>
</head>
<body>
    <div id="root">
        <h2>当前的n是<span v-text="n"></span></h2>
        <h2>放大10倍的n是<span v-big="n"></span></h2>
        <button @click="n++">点我n+1</button>
        <input type="text " v-fbind:value="n">
    </div>

    <script>
        new Vue({
            el:'#root',
            data:{
                n:1


            },
            directives:{
                big(element,binding){
                    console.log('big')
                    element.innerText = binding.value * 10
                },
                fbind:{
                    bind(){

                    },
                    inserted(){},
                    update(){}
                }
            }

        })
    </script>
</body>
</html>